import os

# 文件所在的文件夹路径，根据实际情况进行修改
folder_path = '.'

# 记录新文件名中的序号
index = 1


def rename_files(folder_path):
    global index
    for filename in os.listdir(folder_path):
        if filename.startswith("Recording-") and filename.endswith(".mp4"):
            old_file_path = os.path.join(folder_path, filename)
            # 构建新的文件名
            new_filename = f"中医内科{index}.mp4"
            new_file_path = os.path.join(folder_path, new_filename)
            os.rename(old_file_path, new_file_path)
            index += 1


rename_files(r'D:\v-mac\内科')
